package com.example.myandroidactualcombat.ui.notifications;

import android.app.Application;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;

public class NotificationsViewModel extends ViewModel {

    private MutableLiveData<String> mText;
    private String username;
    private int userid;

    public void setUsername(String username) {
        this.username = username;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public NotificationsViewModel() {

    }

    public LiveData<String> getText() {
        mText=new MutableLiveData<>();
        mText.setValue("你好，"+userid+"号用户"+username);
        return mText;
    }
}